.class public Lcom/noshufou/android/su/preferences/PreferencesActivity;
.super Landroid/preference/PreferenceActivity;
.source "PreferencesActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;
.implements Landroid/preference/Preference$OnPreferenceChangeListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/noshufou/android/su/preferences/PreferencesActivity$BackupApps;,
        Lcom/noshufou/android/su/preferences/PreferencesActivity$ClearLog;,
        Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;,
        Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;
    }
.end annotation


# static fields
.field private static final REQUEST_CHANGE_PIN:I = 0x3

.field private static final REQUEST_DISABLE_PIN:I = 0x2

.field private static final REQUEST_ENABLE_PIN:I = 0x1

.field private static final REQUEST_SECRET_CODE:I = 0x5

.field private static final REQUEST_WRITE_TAG:I = 0x4

.field private static final TAG:Ljava/lang/String; = "Su.PreferencesActivity"


# instance fields
.field private mApkVersion:Landroid/preference/Preference;

.field private mBinVersion:Landroid/preference/Preference;

.field private mClearLog:Landroid/preference/Preference;

.field private mContext:Landroid/content/Context;

.field private mElite:Z

.field private mGhostMode:Landroid/preference/CheckBoxPreference;

.field mLogEntriesSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

.field private mLogLimit:Landroid/preference/Preference;

.field private mOutdatedNotification:Landroid/preference/CheckBoxPreference;

.field private mPin:Landroid/preference/CheckBoxPreference;

.field mPrefs:Landroid/content/SharedPreferences;

.field private mSecretCode:Landroid/preference/Preference;

.field private mTimeoutPreference:Landroid/preference/Preference;

.field mTimeoutSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

.field private mToastLocation:Landroid/preference/Preference;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 60
    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    .line 70
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    .line 72
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogLimit:Landroid/preference/Preference;

    .line 73
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mClearLog:Landroid/preference/Preference;

    .line 74
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mToastLocation:Landroid/preference/Preference;

    .line 75
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mApkVersion:Landroid/preference/Preference;

    .line 76
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mBinVersion:Landroid/preference/Preference;

    .line 77
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mOutdatedNotification:Landroid/preference/CheckBoxPreference;

    .line 78
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutPreference:Landroid/preference/Preference;

    .line 79
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    .line 80
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mGhostMode:Landroid/preference/CheckBoxPreference;

    .line 81
    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    .line 84
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mElite:Z

    .line 315
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$1;

    invoke-direct {v0, p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity$1;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V

    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogEntriesSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

    .line 328
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$2;

    invoke-direct {v0, p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity$2;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V

    iput-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

    .line 60
    return-void
.end method

.method static synthetic access$0(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;
    .locals 1
    .parameter

    .prologue
    .line 72
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogLimit:Landroid/preference/Preference;

    return-object v0
.end method

.method static synthetic access$1(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 83
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$2(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;
    .locals 1
    .parameter

    .prologue
    .line 78
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutPreference:Landroid/preference/Preference;

    return-object v0
.end method

.method static synthetic access$3(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;
    .locals 1
    .parameter

    .prologue
    .line 73
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mClearLog:Landroid/preference/Preference;

    return-object v0
.end method

.method static synthetic access$4(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;
    .locals 1
    .parameter

    .prologue
    .line 75
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mApkVersion:Landroid/preference/Preference;

    return-object v0
.end method

.method static synthetic access$5(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;
    .locals 1
    .parameter

    .prologue
    .line 76
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mBinVersion:Landroid/preference/Preference;

    return-object v0
.end method

.method static synthetic access$6(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/CheckBoxPreference;
    .locals 1
    .parameter

    .prologue
    .line 80
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mGhostMode:Landroid/preference/CheckBoxPreference;

    return-object v0
.end method

.method private goHome()V
    .locals 0

    .prologue
    .line 187
    invoke-static {p0}, Lcom/noshufou/android/su/util/Util;->goHome(Landroid/content/Context;)V

    .line 188
    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 8
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "data"

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    .line 339
    if-nez p2, :cond_1

    .line 340
    packed-switch p1, :pswitch_data_0

    .line 374
    :cond_0
    :goto_0
    return-void

    .line 342
    :pswitch_0
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, v7}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    goto :goto_0

    .line 345
    :pswitch_1
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    goto :goto_0

    .line 351
    :cond_1
    packed-switch p1, :pswitch_data_1

    goto :goto_0

    .line 354
    :pswitch_2
    const-string v3, "pin"

    invoke-virtual {p3, v3}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 355
    const-string v3, "pin"

    invoke-virtual {p3, v3}, Landroid/content/Intent;->getCharSequenceExtra(Ljava/lang/String;)Ljava/lang/CharSequence;

    move-result-object v1

    .line 356
    .local v1, newPin:Ljava/lang/CharSequence;
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    invoke-interface {v3}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    const-string v4, "pin"

    invoke-interface {v1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 357
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    goto :goto_0

    .line 361
    .end local v1           #newPin:Ljava/lang/CharSequence;
    :pswitch_3
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, v7}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    goto :goto_0

    .line 364
    :pswitch_4
    new-instance v0, Landroid/content/Intent;

    const-class v3, Lcom/noshufou/android/su/TagWriterActivity;

    invoke-direct {v0, p0, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 365
    .local v0, intent:Landroid/content/Intent;
    const-string v3, "tag"

    invoke-virtual {v0, v3, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 366
    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 369
    .end local v0           #intent:Landroid/content/Intent;
    :pswitch_5
    const-string v3, "secret_code"

    invoke-virtual {p3, v3}, Landroid/content/Intent;->getCharSequenceExtra(Ljava/lang/String;)Ljava/lang/CharSequence;

    move-result-object v2

    .line 370
    .local v2, newSecretCode:Ljava/lang/CharSequence;
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    invoke-interface {v3}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    const-string v4, "pref_secret_code"

    invoke-interface {v2}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v3

    invoke-interface {v3}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 371
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    const v4, 0x7f0b0046

    new-array v5, v6, [Ljava/lang/Object;

    aput-object v2, v5, v7

    invoke-virtual {p0, v4, v5}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 340
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch

    .line 351
    :pswitch_data_1
    .packed-switch 0x1
        :pswitch_2
        :pswitch_3
        :pswitch_2
        :pswitch_4
        :pswitch_5
    .end packed-switch
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1
    .parameter "v"

    .prologue
    .line 168
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 173
    :goto_0
    return-void

    .line 170
    :pswitch_0
    invoke-direct {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->goHome()V

    goto :goto_0

    .line 168
    :pswitch_data_0
    .packed-switch 0x7f0a000f
        :pswitch_0
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 11
    .parameter "savedInstanceState"

    .prologue
    const/4 v10, 0x1

    const/4 v5, 0x0

    .line 88
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    .line 89
    const v3, 0x7f030004

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->setContentView(I)V

    .line 91
    const/high16 v3, 0x7f05

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->addPreferencesFromResource(I)V

    .line 93
    invoke-virtual {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mContext:Landroid/content/Context;

    .line 96
    const v3, 0x7f0a0002

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    const v4, 0x7f0b0036

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(I)V

    .line 97
    const v3, 0x7f0a000f

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageButton;

    invoke-virtual {v3, p0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 99
    invoke-virtual {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v1

    .line 100
    .local v1, prefScreen:Landroid/preference/PreferenceScreen;
    invoke-virtual {v1}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    .line 102
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mContext:Landroid/content/Context;

    invoke-static {v3, v5, v5}, Lcom/noshufou/android/su/util/Util;->elitePresent(Landroid/content/Context;ZI)Z

    move-result v3

    iput-boolean v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mElite:Z

    .line 103
    iget-boolean v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mElite:Z

    if-nez v3, :cond_2

    .line 104
    const-string v3, "Su.PreferencesActivity"

    const-string v4, "Elite not found, removing Elite preferences"

    invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 105
    sget-object v6, Lcom/noshufou/android/su/preferences/Preferences;->ELITE_PREFS:[Ljava/lang/String;

    array-length v7, v6

    move v4, v5

    :goto_0
    if-lt v4, v7, :cond_0

    .line 143
    :goto_1
    const-string v3, "pref_clear_log"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mClearLog:Landroid/preference/Preference;

    .line 144
    const-string v3, "pref_version"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mApkVersion:Landroid/preference/Preference;

    .line 145
    const-string v3, "pref_bin_version"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mBinVersion:Landroid/preference/Preference;

    .line 147
    const-string v3, "pref_outdated_notification"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    .line 146
    check-cast v3, Landroid/preference/CheckBoxPreference;

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mOutdatedNotification:Landroid/preference/CheckBoxPreference;

    .line 148
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mOutdatedNotification:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, p0}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 149
    return-void

    .line 105
    :cond_0
    aget-object v2, v6, v4

    .line 106
    .local v2, s:Ljava/lang/String;
    const-string v3, ":"

    invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 107
    .local v0, bits:[Ljava/lang/String;
    aget-object v3, v0, v10

    const-string v8, "all"

    invoke-virtual {v3, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 108
    aget-object v3, v0, v5

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 105
    :goto_2
    add-int/lit8 v3, v4, 0x1

    move v4, v3

    goto :goto_0

    .line 110
    :cond_1
    aget-object v3, v0, v5

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    check-cast v3, Landroid/preference/PreferenceCategory;

    .line 111
    aget-object v8, v0, v10

    invoke-virtual {p0, v8}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v8

    invoke-virtual {v3, v8}, Landroid/preference/PreferenceCategory;->removePreference(Landroid/preference/Preference;)Z

    goto :goto_2

    .line 115
    .end local v0           #bits:[Ljava/lang/String;
    .end local v2           #s:Ljava/lang/String;
    :cond_2
    const-string v3, "pref_log_entry_limit"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogLimit:Landroid/preference/Preference;

    .line 116
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogLimit:Landroid/preference/Preference;

    const v4, 0x7f0b0058

    new-array v6, v10, [Ljava/lang/Object;

    .line 117
    iget-object v7, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    const-string v8, "pref_log_entry_limit"

    const/16 v9, 0xc8

    invoke-interface {v7, v8, v9}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v7

    invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    aput-object v7, v6, v5

    .line 116
    invoke-virtual {p0, v4, v6}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 118
    const-string v3, "pref_timeout"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutPreference:Landroid/preference/Preference;

    .line 119
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutPreference:Landroid/preference/Preference;

    const v4, 0x7f0b003d

    new-array v6, v10, [Ljava/lang/Object;

    .line 120
    iget-object v7, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    const-string v8, "pref_timeout"

    invoke-interface {v7, v8, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v7

    invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    aput-object v7, v6, v5

    .line 119
    invoke-virtual {p0, v4, v6}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 121
    const-string v3, "pref_pin"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    check-cast v3, Landroid/preference/CheckBoxPreference;

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPin:Landroid/preference/CheckBoxPreference;

    .line 122
    const-string v3, "pref_ghost_mode"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    check-cast v3, Landroid/preference/CheckBoxPreference;

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mGhostMode:Landroid/preference/CheckBoxPreference;

    .line 123
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mGhostMode:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v3, p0}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 124
    const-string v3, "pref_secret_code"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    .line 125
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    const v4, 0x7f0b0046

    new-array v6, v10, [Ljava/lang/Object;

    .line 126
    iget-object v7, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    const-string v8, "pref_secret_code"

    const-string v9, "787378737"

    invoke-interface {v7, v8, v9}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    aput-object v7, v6, v5

    .line 125
    invoke-virtual {p0, v4, v6}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 127
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    invoke-virtual {v3, p0}, Landroid/preference/Preference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 128
    const-string v3, "pref_toast_location"

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    iput-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mToastLocation:Landroid/preference/Preference;

    .line 129
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mToastLocation:Landroid/preference/Preference;

    invoke-virtual {v1}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v4

    .line 130
    const-string v5, "pref_notification_type"

    const-string v6, "toast"

    invoke-interface {v4, v5, v6}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v5, "toast"

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    .line 129
    invoke-virtual {v3, v4}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 133
    sget v3, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v4, 0xa

    if-lt v3, v4, :cond_3

    .line 134
    invoke-static {p0}, Landroid/nfc/NfcAdapter;->getDefaultAdapter(Landroid/content/Context;)Landroid/nfc/NfcAdapter;

    move-result-object v3

    if-nez v3, :cond_3

    .line 135
    const-string v3, "pref_category_nfc"

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 139
    :cond_3
    const-string v3, "pref_category_info"

    invoke-virtual {p0, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    check-cast v3, Landroid/preference/PreferenceCategory;

    .line 140
    const-string v4, "pref_get_elite"

    invoke-virtual {p0, v4}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/preference/PreferenceCategory;->removePreference(Landroid/preference/Preference;)Z

    goto/16 :goto_1
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 1
    .parameter "item"

    .prologue
    .line 177
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 182
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z

    move-result v0

    :goto_0
    return v0

    .line 179
    :pswitch_0
    invoke-direct {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->goHome()V

    .line 180
    const/4 v0, 0x1

    goto :goto_0

    .line 177
    nop

    :pswitch_data_0
    .packed-switch 0x102002c
        :pswitch_0
    .end packed-switch
.end method

.method protected onPause()V
    .locals 1

    .prologue
    .line 161
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onPause()V

    .line 162
    invoke-virtual {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    .line 163
    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->unregisterOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    .line 164
    return-void
.end method

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
    .locals 7
    .parameter "preference"
    .parameter "newValue"

    .prologue
    const/4 v2, 0x0

    const/4 v3, 0x1

    .line 262
    invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v1

    .line 263
    .local v1, pref:Ljava/lang/String;
    const-string v4, "pref_ghost_mode"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 264
    check-cast p2, Ljava/lang/Boolean;

    .end local p2
    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    .line 265
    .local v0, ghostMode:Z
    if-eqz v0, :cond_1

    .line 266
    new-instance v3, Landroid/app/AlertDialog$Builder;

    invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v4, 0x7f0b0040

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 267
    const v4, 0x7f0b0043

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 268
    const v4, 0x7f0b0015

    new-instance v5, Lcom/noshufou/android/su/preferences/PreferencesActivity$3;

    invoke-direct {v5, p0, v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity$3;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Z)V

    invoke-virtual {v3, v4, v5}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 281
    const v4, 0x7f0b0016

    new-instance v5, Lcom/noshufou/android/su/preferences/PreferencesActivity$4;

    invoke-direct {v5, p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity$4;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V

    invoke-virtual {v3, v4, v5}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    .line 287
    invoke-virtual {v3}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v3

    invoke-virtual {v3}, Landroid/app/AlertDialog;->show()V

    move v3, v2

    .line 302
    .end local v0           #ghostMode:Z
    :cond_0
    :goto_0
    return v3

    .line 289
    .restart local v0       #ghostMode:Z
    :cond_1
    invoke-virtual {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v4

    if-eqz v0, :cond_2

    :goto_1
    invoke-static {v4, v2}, Lcom/noshufou/android/su/util/Util;->toggleAppIcon(Landroid/content/Context;Z)V

    goto :goto_0

    :cond_2
    move v2, v3

    goto :goto_1

    .line 293
    .end local v0           #ghostMode:Z
    .restart local p2
    :cond_3
    const-string v4, "pref_secret_code"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_4

    .line 294
    iget-object v4, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mSecretCode:Landroid/preference/Preference;

    const v5, 0x7f0b0046

    new-array v6, v3, [Ljava/lang/Object;

    .line 295
    check-cast p2, Ljava/lang/String;

    .end local p2
    aput-object p2, v6, v2

    .line 294
    invoke-virtual {p0, v5, v6}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 297
    .restart local p2
    :cond_4
    const-string v2, "pref_outdated_notification"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    check-cast p2, Ljava/lang/Boolean;

    .end local p2
    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    if-nez v2, :cond_0

    .line 298
    const-string v2, "Su.PreferencesActivity"

    const-string v4, "Cancel the notification"

    invoke-static {v2, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 299
    const-string v2, "notification"

    invoke-virtual {p0, v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/NotificationManager;

    .line 300
    const/16 v4, 0x2a

    invoke-virtual {v2, v4}, Landroid/app/NotificationManager;->cancel(I)V

    goto :goto_0
.end method

.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
    .locals 10
    .parameter "preferenceScreen"
    .parameter "preference"

    .prologue
    const/4 v5, 0x2

    const/4 v2, 0x0

    const/4 v3, 0x3

    const/4 v0, 0x1

    const/4 v4, 0x0

    .line 193
    invoke-virtual {p2}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

    move-result-object v9

    .line 194
    .local v9, pref:Ljava/lang/String;
    const-string v1, "pref_log_entry_limit"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 195
    new-instance v0, Lcom/noshufou/android/su/widget/NumberPickerDialog;

    .line 196
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mLogEntriesSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

    .line 197
    iget-object v1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    const-string v3, "pref_log_entry_limit"

    const/16 v5, 0xc8

    invoke-interface {v1, v3, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    .line 199
    const/16 v5, 0x1f4

    .line 200
    const v6, 0x7f0b0057

    move-object v1, p0

    .line 195
    invoke-direct/range {v0 .. v6}, Lcom/noshufou/android/su/widget/NumberPickerDialog;-><init>(Landroid/content/Context;Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;IIII)V

    .line 200
    invoke-virtual {v0}, Lcom/noshufou/android/su/widget/NumberPickerDialog;->show()V

    .line 257
    :cond_0
    :goto_0
    invoke-super {p0, p1, p2}, Landroid/preference/PreferenceActivity;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

    move-result v4

    :cond_1
    :goto_1
    return v4

    .line 201
    :cond_2
    const-string v1, "pref_clear_log"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 202
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$ClearLog;

    invoke-direct {v0, p0, v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity$ClearLog;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$ClearLog;)V

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$ClearLog;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0

    .line 203
    :cond_3
    const-string v1, "pref_bin_version"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 204
    new-instance v8, Landroid/content/Intent;

    const-class v1, Lcom/noshufou/android/su/UpdaterActivity;

    invoke-direct {v8, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 205
    .local v8, intent:Landroid/content/Intent;
    invoke-virtual {p0, v8}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivity(Landroid/content/Intent;)V

    move v4, v0

    .line 206
    goto :goto_1

    .line 207
    .end local v8           #intent:Landroid/content/Intent;
    :cond_4
    const-string v1, "pref_pin"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 208
    new-instance v8, Landroid/content/Intent;

    const-class v1, Lcom/noshufou/android/su/PinActivity;

    invoke-direct {v8, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 209
    .restart local v8       #intent:Landroid/content/Intent;
    invoke-virtual {p1}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v1

    const-string v2, "pref_pin"

    invoke-interface {v1, v2, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 210
    const-string v1, "mode"

    invoke-virtual {v8, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 211
    invoke-virtual {p0, v8, v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivityForResult(Landroid/content/Intent;I)V

    :goto_2
    move v4, v0

    .line 216
    goto :goto_1

    .line 213
    :cond_5
    const-string v1, "mode"

    invoke-virtual {v8, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 214
    invoke-virtual {p0, v8, v5}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_2

    .line 217
    .end local v8           #intent:Landroid/content/Intent;
    :cond_6
    const-string v1, "pref_change_pin"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_7

    .line 218
    new-instance v8, Landroid/content/Intent;

    const-class v0, Lcom/noshufou/android/su/PinActivity;

    invoke-direct {v8, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 219
    .restart local v8       #intent:Landroid/content/Intent;
    const-string v0, "mode"

    invoke-virtual {v8, v0, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 220
    invoke-virtual {p0, v8, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    .line 221
    .end local v8           #intent:Landroid/content/Intent;
    :cond_7
    const-string v1, "pref_ghost_mode"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_8

    move v4, v0

    .line 222
    goto :goto_1

    .line 223
    :cond_8
    const-string v1, "pref_secret_code"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_9

    .line 224
    new-instance v8, Landroid/content/Intent;

    const-class v0, Lcom/noshufou/android/su/PinActivity;

    invoke-direct {v8, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 225
    .restart local v8       #intent:Landroid/content/Intent;
    const-string v0, "mode"

    const/4 v1, 0x4

    invoke-virtual {v8, v0, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 226
    const/4 v0, 0x5

    invoke-virtual {p0, v8, v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivityForResult(Landroid/content/Intent;I)V

    goto/16 :goto_0

    .line 227
    .end local v8           #intent:Landroid/content/Intent;
    :cond_9
    const-string v1, "pref_timeout"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_a

    .line 228
    new-instance v0, Lcom/noshufou/android/su/widget/NumberPickerDialog;

    .line 229
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mTimeoutSet:Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;

    .line 230
    iget-object v1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mPrefs:Landroid/content/SharedPreferences;

    const-string v3, "pref_timeout"

    invoke-interface {v1, v3, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    .line 231
    const/16 v5, 0x258

    .line 232
    const v6, 0x7f0b003c

    move-object v1, p0

    .line 228
    invoke-direct/range {v0 .. v6}, Lcom/noshufou/android/su/widget/NumberPickerDialog;-><init>(Landroid/content/Context;Lcom/noshufou/android/su/widget/NumberPickerDialog$OnNumberSetListener;IIII)V

    .line 232
    invoke-virtual {v0}, Lcom/noshufou/android/su/widget/NumberPickerDialog;->show()V

    goto/16 :goto_0

    .line 233
    :cond_a
    const-string v1, "pref_use_allow_tag"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_b

    .line 234
    const-string v1, "pref_write_allow_tag"

    invoke-virtual {v9, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_c

    .line 235
    :cond_b
    invoke-virtual {p1}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v1

    .line 236
    const-string v2, "pref_use_allow_tag"

    invoke-interface {v1, v2, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 239
    new-instance v8, Landroid/content/Intent;

    const-class v1, Lcom/noshufou/android/su/PinActivity;

    invoke-direct {v8, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 240
    .restart local v8       #intent:Landroid/content/Intent;
    const-string v1, "mode"

    invoke-virtual {v8, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 241
    const/4 v1, 0x4

    invoke-virtual {p0, v8, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivityForResult(Landroid/content/Intent;I)V

    move v4, v0

    .line 242
    goto/16 :goto_1

    .line 244
    .end local v8           #intent:Landroid/content/Intent;
    :cond_c
    const-string v0, "pref_changelog"

    invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_d

    .line 245
    new-instance v7, Lcom/noshufou/android/su/widget/ChangeLog;

    invoke-direct {v7, p0}, Lcom/noshufou/android/su/widget/ChangeLog;-><init>(Landroid/content/Context;)V

    .line 246
    .local v7, cl:Lcom/noshufou/android/su/widget/ChangeLog;
    invoke-virtual {v7}, Lcom/noshufou/android/su/widget/ChangeLog;->getFullLogDialog()Landroid/app/AlertDialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    goto/16 :goto_0

    .line 247
    .end local v7           #cl:Lcom/noshufou/android/su/widget/ChangeLog;
    :cond_d
    const-string v0, "pref_get_elite"

    invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_e

    .line 248
    new-instance v8, Landroid/content/Intent;

    const-string v0, "android.intent.action.VIEW"

    invoke-direct {v8, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 249
    .restart local v8       #intent:Landroid/content/Intent;
    const-string v0, "market://details?id=com.noshufou.android.su.elite"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v8, v0}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 250
    invoke-virtual {p0, v8}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_0

    .line 251
    .end local v8           #intent:Landroid/content/Intent;
    :cond_e
    const-string v0, "pref_backup"

    invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_f

    .line 252
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$BackupApps;

    invoke-direct {v0, p0, v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity$BackupApps;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$BackupApps;)V

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$BackupApps;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto/16 :goto_0

    .line 253
    :cond_f
    const-string v0, "pref_restore"

    invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 254
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;

    invoke-direct {v0, p0, v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;)V

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto/16 :goto_0
.end method

.method protected onResume()V
    .locals 2

    .prologue
    .line 153
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onResume()V

    .line 154
    invoke-virtual {p0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceScreen;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    .line 155
    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->registerOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    .line 156
    new-instance v0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 157
    return-void
.end method

.method public onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    .locals 3
    .parameter "sharedPreferences"
    .parameter "key"

    .prologue
    .line 308
    const-string v0, "pref_notification_type"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mToastLocation:Landroid/preference/Preference;

    if-eqz v0, :cond_0

    .line 309
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity;->mToastLocation:Landroid/preference/Preference;

    .line 310
    const-string v1, "pref_notification_type"

    const-string v2, "toast"

    invoke-interface {p1, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "toast"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    .line 309
    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 312
    :cond_0
    return-void
.end method
